Repository navigation
fix(tests): reclaim read-only pytest temporary trees - #9189
Conversation
Signed-off-by: LoopX Agent <[email protected]>
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · self-review · exact head 6ce24f52bb85df17ae73fe12d656f7c95f12afb8
Approval conclusion (author-owned PR; GitHub blocks formal self-approval).
The follow-up repairs the blocking finding in #9070: a failed temporary-tree removal now restores owner access only inside the test-owned tree, skips symlinks, junctions, and multiply-linked files, then retries. Cleanup errors no longer emit PytestWarning from pytest hooks, so -W error cannot turn best-effort cleanup into INTERNALERROR; failures are reported in the terminal summary instead.
Validation: tests/test_managed_effect_runtime_fixture.py passed 15 with 1 skip; the three migrated case_mktemp consumers passed 71; the new 0o444 file / 0o555 directory regression passed under -W error; focused Ruff checks and git diff --check passed.
Follow-up for #9070 after the merged pytest temporary-directory cleanup.
This repairs the blocking review finding:
PytestWarningfrom pytest hooks so-W errorcannot becomeINTERNALERROR0o444file /0o555directory regression under-W errorValidation:
15 passed, 1 skippedintests/test_managed_effect_runtime_fixture.py71 passedacross the three migratedcase_mktempconsumersgit diff --checkpassed